package masterjava.common.shared.util;

import java.util.ArrayList;
import java.util.List;

/**
 * User: Grigory Kislin
 * Date: 04/07/11
 */
public class SerializeUtil {

    public static <T> List<T> getSerializedCollection(List<T> collection) {
        if (SharedUtil.isEmpty(collection)) {
            return collection;
        }
        ArrayList<T> list = new ArrayList<T>(collection.size());
        for (T entity : collection) {
            list.add(entity);
        }
        return list;
    }
}
